package com.ustze.ocr.type.baidu.utils;

import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baidu.aip.ocr.AipOcr;
import com.google.common.collect.Maps;
import com.ustze.ocr.properties.OcrProperties;
import com.ustze.ocr.type.baidu.constant.BaiduOcrApiConstant;
import com.ustze.ocr.type.baidu.vo.BaiduResponse;
import com.ustze.ocr.utils.RedisUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.time.Duration;
import java.util.HashMap;

/**
 * @author zk
 * @date 2025/04/11
 */
@Component
@RequiredArgsConstructor
public class BaiduOcrUtils {

    private final OcrProperties ocrProperties;;


    public void createBaiduOcrClient() {
        AipOcr client = new AipOcr(
                ocrProperties.getBaidu().getAppId(),
                ocrProperties.getBaidu().getAppKey(),
                ocrProperties.getBaidu().getSecretKey());

        HashMap<String, String> options = Maps.newHashMap();
        options.put("language_type", "CHN_ENG");
        options.put("detect_direction", "true");
        options.put("detect_language", "true");
        options.put("probability", "true");

//        client.basicGeneral()

    }


    public String accessToken() {
        String accessToken = RedisUtils.getCacheObject(BaiduOcrApiConstant.ACCESS_TOKEN_KEY);
        if (StrUtil.isBlank(accessToken)) {
            String url = String.format(BaiduOcrApiConstant.ACCESS_TOKEN, ocrProperties.getBaidu().getAppKey(), ocrProperties.getBaidu().getSecretKey());
            String res = HttpUtil.post(url, "");
            BaiduResponse baiduResponse = JSONObject.parseObject(res, BaiduResponse.class);
            accessToken = baiduResponse.getAccessToken();
            Long expiresIn = baiduResponse.getExpiresIn();
            Duration duration = Duration.ofSeconds(expiresIn - 1000);
            // 放在redis 中
            RedisUtils.setObjectIfAbsent(BaiduOcrApiConstant.ACCESS_TOKEN_KEY, accessToken, duration);
        }
        return accessToken;
    }


    public void buildBo() {
        String text = "{\"tables_result\":[{\"header\":[],\"body\":[{\"col_end\":9,\"row_end\":1,\"cell_location\":[{\"x\":0,\"y\":0},{\"x\":449,\"y\":0},{\"x\":449,\"y\":24},{\"x\":0,\"y\":24}],\"row_start\":0,\"col_start\":0,\"words\":\"掘进作业循环情况（次数）\"},{\"col_end\":12,\"row_end\":1,\"cell_location\":[{\"x\":449,\"y\":0},{\"x\":601,\"y\":0},{\"x\":601,\"y\":24},{\"x\":449,\"y\":24}],\"row_start\":0,\"col_start\":9,\"words\":\"回采作业循环情况（次数）\"},{\"col_end\":13,\"row_end\":3,\"cell_location\":[{\"x\":601,\"y\":0},{\"x\":737,\"y\":0},{\"x\":737,\"y\":77},{\"x\":601,\"y\":77}],\"row_start\":0,\"col_start\":12,\"words\":\"备注\"},{\"col_end\":3,\"row_end\":2,\"cell_location\":[{\"x\":0,\"y\":24},{\"x\":146,\"y\":24},{\"x\":146,\"y\":50},{\"x\":0,\"y\":50}],\"row_start\":1,\"col_start\":0,\"words\":\"3305运输顺槽\"},{\"col_end\":6,\"row_end\":2,\"cell_location\":[{\"x\":146,\"y\":24},{\"x\":298,\"y\":24},{\"x\":298,\"y\":50},{\"x\":146,\"y\":50}],\"row_start\":1,\"col_start\":3,\"words\":\"副斜井上段\"},{\"col_end\":9,\"row_end\":2,\"cell_location\":[{\"x\":298,\"y\":24},{\"x\":449,\"y\":24},{\"x\":449,\"y\":50},{\"x\":298,\"y\":50}],\"row_start\":1,\"col_start\":6,\"words\":\"副斜井上段（北段）\"},{\"col_end\":12,\"row_end\":2,\"cell_location\":[{\"x\":449,\"y\":24},{\"x\":601,\"y\":24},{\"x\":601,\"y\":50},{\"x\":449,\"y\":50}],\"row_start\":1,\"col_start\":9,\"words\":\"3306工作面\"},{\"col_end\":1,\"row_end\":3,\"cell_location\":[{\"x\":0,\"y\":50},{\"x\":47,\"y\":50},{\"x\":47,\"y\":77},{\"x\":0,\"y\":77}],\"row_start\":2,\"col_start\":0,\"words\":\"夜班\"},{\"col_end\":2,\"row_end\":3,\"cell_location\":[{\"x\":47,\"y\":50},{\"x\":98,\"y\":50},{\"x\":98,\"y\":77},{\"x\":47,\"y\":77}],\"row_start\":2,\"col_start\":1,\"words\":\"早班\"},{\"col_end\":3,\"row_end\":3,\"cell_location\":[{\"x\":98,\"y\":50},{\"x\":147,\"y\":50},{\"x\":147,\"y\":77},{\"x\":98,\"y\":77}],\"row_start\":2,\"col_start\":2,\"words\":\"中班\"},{\"col_end\":4,\"row_end\":3,\"cell_location\":[{\"x\":147,\"y\":50},{\"x\":199,\"y\":50},{\"x\":199,\"y\":77},{\"x\":147,\"y\":77}],\"row_start\":2,\"col_start\":3,\"words\":\"夜班\"},{\"col_end\":5,\"row_end\":3,\"cell_location\":[{\"x\":199,\"y\":50},{\"x\":249,\"y\":50},{\"x\":248,\"y\":77},{\"x\":199,\"y\":77}],\"row_start\":2,\"col_start\":4,\"words\":\"早班\"},{\"col_end\":6,\"row_end\":3,\"cell_location\":[{\"x\":249,\"y\":50},{\"x\":298,\"y\":50},{\"x\":298,\"y\":77},{\"x\":248,\"y\":77}],\"row_start\":2,\"col_start\":5,\"words\":\"中班\"},{\"col_end\":7,\"row_end\":3,\"cell_location\":[{\"x\":298,\"y\":50},{\"x\":350,\"y\":50},{\"x\":350,\"y\":77},{\"x\":298,\"y\":77}],\"row_start\":2,\"col_start\":6,\"words\":\"夜班\"},{\"col_end\":8,\"row_end\":3,\"cell_location\":[{\"x\":350,\"y\":50},{\"x\":400,\"y\":50},{\"x\":400,\"y\":77},{\"x\":350,\"y\":77}],\"row_start\":2,\"col_start\":7,\"words\":\"早班\"},{\"col_end\":9,\"row_end\":3,\"cell_location\":[{\"x\":400,\"y\":50},{\"x\":450,\"y\":50},{\"x\":450,\"y\":77},{\"x\":400,\"y\":77}],\"row_start\":2,\"col_start\":8,\"words\":\"中班\"},{\"col_end\":10,\"row_end\":3,\"cell_location\":[{\"x\":450,\"y\":50},{\"x\":500,\"y\":50},{\"x\":500,\"y\":77},{\"x\":450,\"y\":77}],\"row_start\":2,\"col_start\":9,\"words\":\"夜班\"},{\"col_end\":11,\"row_end\":3,\"cell_location\":[{\"x\":500,\"y\":50},{\"x\":550,\"y\":50},{\"x\":550,\"y\":77},{\"x\":500,\"y\":77}],\"row_start\":2,\"col_start\":10,\"words\":\"早班\"},{\"col_end\":12,\"row_end\":3,\"cell_location\":[{\"x\":550,\"y\":50},{\"x\":601,\"y\":50},{\"x\":601,\"y\":77},{\"x\":550,\"y\":77}],\"row_start\":2,\"col_start\":11,\"words\":\"中班\"},{\"col_end\":1,\"row_end\":4,\"cell_location\":[{\"x\":0,\"y\":77},{\"x\":47,\"y\":77},{\"x\":47,\"y\":177},{\"x\":0,\"y\":177}],\"row_start\":3,\"col_start\":0,\"words\":\"4个循环\"},{\"col_end\":2,\"row_end\":4,\"cell_location\":[{\"x\":47,\"y\":77},{\"x\":98,\"y\":77},{\"x\":98,\"y\":177},{\"x\":47,\"y\":177}],\"row_start\":3,\"col_start\":1,\"words\":\"0个循环\"},{\"col_end\":3,\"row_end\":4,\"cell_location\":[{\"x\":98,\"y\":77},{\"x\":147,\"y\":77},{\"x\":147,\"y\":177},{\"x\":98,\"y\":177}],\"row_start\":3,\"col_start\":2,\"words\":\"0个循环\"},{\"col_end\":4,\"row_end\":4,\"cell_location\":[{\"x\":147,\"y\":77},{\"x\":199,\"y\":77},{\"x\":199,\"y\":177},{\"x\":147,\"y\":177}],\"row_start\":3,\"col_start\":3,\"words\":\"1个循环\"},{\"col_end\":5,\"row_end\":4,\"cell_location\":[{\"x\":199,\"y\":77},{\"x\":248,\"y\":77},{\"x\":249,\"y\":177},{\"x\":199,\"y\":177}],\"row_start\":3,\"col_start\":4,\"words\":\"0个循环\"},{\"col_end\":6,\"row_end\":4,\"cell_location\":[{\"x\":248,\"y\":77},{\"x\":298,\"y\":77},{\"x\":298,\"y\":177},{\"x\":249,\"y\":177}],\"row_start\":3,\"col_start\":5,\"words\":\"2个循环\"},{\"col_end\":7,\"row_end\":4,\"cell_location\":[{\"x\":298,\"y\":77},{\"x\":350,\"y\":77},{\"x\":350,\"y\":177},{\"x\":298,\"y\":177}],\"row_start\":3,\"col_start\":6,\"words\":\"1个循环\"},{\"col_end\":8,\"row_end\":4,\"cell_location\":[{\"x\":350,\"y\":77},{\"x\":400,\"y\":77},{\"x\":400,\"y\":177},{\"x\":350,\"y\":177}],\"row_start\":3,\"col_start\":7,\"words\":\"0个循环\"},{\"col_end\":9,\"row_end\":4,\"cell_location\":[{\"x\":400,\"y\":77},{\"x\":450,\"y\":77},{\"x\":450,\"y\":177},{\"x\":400,\"y\":177}],\"row_start\":3,\"col_start\":8,\"words\":\"2个循环\"},{\"col_end\":10,\"row_end\":4,\"cell_location\":[{\"x\":450,\"y\":77},{\"x\":500,\"y\":77},{\"x\":500,\"y\":177},{\"x\":450,\"y\":177}],\"row_start\":3,\"col_start\":9,\"words\":\"0个循环\"},{\"col_end\":11,\"row_end\":4,\"cell_location\":[{\"x\":500,\"y\":77},{\"x\":550,\"y\":77},{\"x\":550,\"y\":177},{\"x\":500,\"y\":177}],\"row_start\":3,\"col_start\":10,\"words\":\"0个循环\"},{\"col_end\":12,\"row_end\":4,\"cell_location\":[{\"x\":550,\"y\":77},{\"x\":601,\"y\":77},{\"x\":601,\"y\":177},{\"x\":550,\"y\":177}],\"row_start\":3,\"col_start\":11,\"words\":\"1个循环\"},{\"col_end\":13,\"row_end\":5,\"cell_location\":[{\"x\":601,\"y\":77},{\"x\":737,\"y\":77},{\"x\":737,\"y\":293},{\"x\":601,\"y\":292}],\"row_start\":3,\"col_start\":12,\"words\":\"1、3306工作面使用变化\\n情形二（末采）\\n2、副斜井上段使用变化\\n情形四（迎头软岩、顶板\\n硬岩)\\n3、3305运输顺槽变化情\\n形三（过本煤层空巷期\\n间)\"},{\"col_end\":1,\"row_end\":5,\"cell_location\":[{\"x\":0,\"y\":177},{\"x\":47,\"y\":177},{\"x\":47,\"y\":293},{\"x\":0,\"y\":292}],\"row_start\":4,\"col_start\":0,\"words\":\"正常\"},{\"col_end\":2,\"row_end\":5,\"cell_location\":[{\"x\":47,\"y\":177},{\"x\":98,\"y\":177},{\"x\":98,\"y\":293},{\"x\":47,\"y\":293}],\"row_start\":4,\"col_start\":1,\"words\":\"检修设\\n备、标\\n准化治\\n理、探\\n水\"},{\"col_end\":3,\"row_end\":5,\"cell_location\":[{\"x\":98,\"y\":177},{\"x\":147,\"y\":177},{\"x\":147,\"y\":293},{\"x\":98,\"y\":293}],\"row_start\":4,\"col_start\":2,\"words\":\"标准化\\n治理\"},{\"col_end\":4,\"row_end\":5,\"cell_location\":[{\"x\":147,\"y\":177},{\"x\":199,\"y\":177},{\"x\":199,\"y\":293},{\"x\":147,\"y\":293}],\"row_start\":4,\"col_start\":3,\"words\":\"标准化\\n治理\"},{\"col_end\":5,\"row_end\":5,\"cell_location\":[{\"x\":199,\"y\":177},{\"x\":249,\"y\":177},{\"x\":249,\"y\":293},{\"x\":199,\"y\":293}],\"row_start\":4,\"col_start\":4,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":6,\"row_end\":5,\"cell_location\":[{\"x\":249,\"y\":177},{\"x\":298,\"y\":177},{\"x\":298,\"y\":293},{\"x\":249,\"y\":293}],\"row_start\":4,\"col_start\":5,\"words\":\"正常\"},{\"col_end\":7,\"row_end\":5,\"cell_location\":[{\"x\":298,\"y\":177},{\"x\":350,\"y\":177},{\"x\":350,\"y\":293},{\"x\":298,\"y\":293}],\"row_start\":4,\"col_start\":6,\"words\":\"标准化\\n治理\"},{\"col_end\":8,\"row_end\":5,\"cell_location\":[{\"x\":350,\"y\":177},{\"x\":400,\"y\":177},{\"x\":400,\"y\":293},{\"x\":350,\"y\":293}],\"row_start\":4,\"col_start\":7,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":9,\"row_end\":5,\"cell_location\":[{\"x\":400,\"y\":177},{\"x\":450,\"y\":177},{\"x\":450,\"y\":293},{\"x\":400,\"y\":293}],\"row_start\":4,\"col_start\":8,\"words\":\"正常\"},{\"col_end\":10,\"row_end\":5,\"cell_location\":[{\"x\":450,\"y\":177},{\"x\":500,\"y\":177},{\"x\":500,\"y\":293},{\"x\":450,\"y\":293}],\"row_start\":4,\"col_start\":9,\"words\":\"标准化\\n治理\"},{\"col_end\":11,\"row_end\":5,\"cell_location\":[{\"x\":500,\"y\":177},{\"x\":550,\"y\":177},{\"x\":550,\"y\":293},{\"x\":500,\"y\":293}],\"row_start\":4,\"col_start\":10,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":12,\"row_end\":5,\"cell_location\":[{\"x\":550,\"y\":177},{\"x\":601,\"y\":177},{\"x\":601,\"y\":293},{\"x\":550,\"y\":293}],\"row_start\":4,\"col_start\":11,\"words\":\"正常\"}],\"table_location\":[{\"x\":0,\"y\":0},{\"x\":737,\"y\":0},{\"x\":737,\"y\":293},{\"x\":0,\"y\":293}],\"footer\":[]}],\"table_num\":1,\"log_id\":1910572136862638890}";
        JSONObject jsonObject = JSONObject.parseObject(text);
        String body = jsonObject.getString("body");



    }

    public static void main(String[] args) {
        String text = "{\"tables_result\":[{\"header\":[],\"body\":[{\"col_end\":9,\"row_end\":1,\"cell_location\":[{\"x\":0,\"y\":0},{\"x\":449,\"y\":0},{\"x\":449,\"y\":24},{\"x\":0,\"y\":24}],\"row_start\":0,\"col_start\":0,\"words\":\"掘进作业循环情况（次数）\"},{\"col_end\":12,\"row_end\":1,\"cell_location\":[{\"x\":449,\"y\":0},{\"x\":601,\"y\":0},{\"x\":601,\"y\":24},{\"x\":449,\"y\":24}],\"row_start\":0,\"col_start\":9,\"words\":\"回采作业循环情况（次数）\"},{\"col_end\":13,\"row_end\":3,\"cell_location\":[{\"x\":601,\"y\":0},{\"x\":737,\"y\":0},{\"x\":737,\"y\":77},{\"x\":601,\"y\":77}],\"row_start\":0,\"col_start\":12,\"words\":\"备注\"},{\"col_end\":3,\"row_end\":2,\"cell_location\":[{\"x\":0,\"y\":24},{\"x\":146,\"y\":24},{\"x\":146,\"y\":50},{\"x\":0,\"y\":50}],\"row_start\":1,\"col_start\":0,\"words\":\"3305运输顺槽\"},{\"col_end\":6,\"row_end\":2,\"cell_location\":[{\"x\":146,\"y\":24},{\"x\":298,\"y\":24},{\"x\":298,\"y\":50},{\"x\":146,\"y\":50}],\"row_start\":1,\"col_start\":3,\"words\":\"副斜井上段\"},{\"col_end\":9,\"row_end\":2,\"cell_location\":[{\"x\":298,\"y\":24},{\"x\":449,\"y\":24},{\"x\":449,\"y\":50},{\"x\":298,\"y\":50}],\"row_start\":1,\"col_start\":6,\"words\":\"副斜井上段（北段）\"},{\"col_end\":12,\"row_end\":2,\"cell_location\":[{\"x\":449,\"y\":24},{\"x\":601,\"y\":24},{\"x\":601,\"y\":50},{\"x\":449,\"y\":50}],\"row_start\":1,\"col_start\":9,\"words\":\"3306工作面\"},{\"col_end\":1,\"row_end\":3,\"cell_location\":[{\"x\":0,\"y\":50},{\"x\":47,\"y\":50},{\"x\":47,\"y\":77},{\"x\":0,\"y\":77}],\"row_start\":2,\"col_start\":0,\"words\":\"夜班\"},{\"col_end\":2,\"row_end\":3,\"cell_location\":[{\"x\":47,\"y\":50},{\"x\":98,\"y\":50},{\"x\":98,\"y\":77},{\"x\":47,\"y\":77}],\"row_start\":2,\"col_start\":1,\"words\":\"早班\"},{\"col_end\":3,\"row_end\":3,\"cell_location\":[{\"x\":98,\"y\":50},{\"x\":147,\"y\":50},{\"x\":147,\"y\":77},{\"x\":98,\"y\":77}],\"row_start\":2,\"col_start\":2,\"words\":\"中班\"},{\"col_end\":4,\"row_end\":3,\"cell_location\":[{\"x\":147,\"y\":50},{\"x\":199,\"y\":50},{\"x\":199,\"y\":77},{\"x\":147,\"y\":77}],\"row_start\":2,\"col_start\":3,\"words\":\"夜班\"},{\"col_end\":5,\"row_end\":3,\"cell_location\":[{\"x\":199,\"y\":50},{\"x\":249,\"y\":50},{\"x\":248,\"y\":77},{\"x\":199,\"y\":77}],\"row_start\":2,\"col_start\":4,\"words\":\"早班\"},{\"col_end\":6,\"row_end\":3,\"cell_location\":[{\"x\":249,\"y\":50},{\"x\":298,\"y\":50},{\"x\":298,\"y\":77},{\"x\":248,\"y\":77}],\"row_start\":2,\"col_start\":5,\"words\":\"中班\"},{\"col_end\":7,\"row_end\":3,\"cell_location\":[{\"x\":298,\"y\":50},{\"x\":350,\"y\":50},{\"x\":350,\"y\":77},{\"x\":298,\"y\":77}],\"row_start\":2,\"col_start\":6,\"words\":\"夜班\"},{\"col_end\":8,\"row_end\":3,\"cell_location\":[{\"x\":350,\"y\":50},{\"x\":400,\"y\":50},{\"x\":400,\"y\":77},{\"x\":350,\"y\":77}],\"row_start\":2,\"col_start\":7,\"words\":\"早班\"},{\"col_end\":9,\"row_end\":3,\"cell_location\":[{\"x\":400,\"y\":50},{\"x\":450,\"y\":50},{\"x\":450,\"y\":77},{\"x\":400,\"y\":77}],\"row_start\":2,\"col_start\":8,\"words\":\"中班\"},{\"col_end\":10,\"row_end\":3,\"cell_location\":[{\"x\":450,\"y\":50},{\"x\":500,\"y\":50},{\"x\":500,\"y\":77},{\"x\":450,\"y\":77}],\"row_start\":2,\"col_start\":9,\"words\":\"夜班\"},{\"col_end\":11,\"row_end\":3,\"cell_location\":[{\"x\":500,\"y\":50},{\"x\":550,\"y\":50},{\"x\":550,\"y\":77},{\"x\":500,\"y\":77}],\"row_start\":2,\"col_start\":10,\"words\":\"早班\"},{\"col_end\":12,\"row_end\":3,\"cell_location\":[{\"x\":550,\"y\":50},{\"x\":601,\"y\":50},{\"x\":601,\"y\":77},{\"x\":550,\"y\":77}],\"row_start\":2,\"col_start\":11,\"words\":\"中班\"},{\"col_end\":1,\"row_end\":4,\"cell_location\":[{\"x\":0,\"y\":77},{\"x\":47,\"y\":77},{\"x\":47,\"y\":177},{\"x\":0,\"y\":177}],\"row_start\":3,\"col_start\":0,\"words\":\"4个循环\"},{\"col_end\":2,\"row_end\":4,\"cell_location\":[{\"x\":47,\"y\":77},{\"x\":98,\"y\":77},{\"x\":98,\"y\":177},{\"x\":47,\"y\":177}],\"row_start\":3,\"col_start\":1,\"words\":\"0个循环\"},{\"col_end\":3,\"row_end\":4,\"cell_location\":[{\"x\":98,\"y\":77},{\"x\":147,\"y\":77},{\"x\":147,\"y\":177},{\"x\":98,\"y\":177}],\"row_start\":3,\"col_start\":2,\"words\":\"0个循环\"},{\"col_end\":4,\"row_end\":4,\"cell_location\":[{\"x\":147,\"y\":77},{\"x\":199,\"y\":77},{\"x\":199,\"y\":177},{\"x\":147,\"y\":177}],\"row_start\":3,\"col_start\":3,\"words\":\"1个循环\"},{\"col_end\":5,\"row_end\":4,\"cell_location\":[{\"x\":199,\"y\":77},{\"x\":248,\"y\":77},{\"x\":249,\"y\":177},{\"x\":199,\"y\":177}],\"row_start\":3,\"col_start\":4,\"words\":\"0个循环\"},{\"col_end\":6,\"row_end\":4,\"cell_location\":[{\"x\":248,\"y\":77},{\"x\":298,\"y\":77},{\"x\":298,\"y\":177},{\"x\":249,\"y\":177}],\"row_start\":3,\"col_start\":5,\"words\":\"2个循环\"},{\"col_end\":7,\"row_end\":4,\"cell_location\":[{\"x\":298,\"y\":77},{\"x\":350,\"y\":77},{\"x\":350,\"y\":177},{\"x\":298,\"y\":177}],\"row_start\":3,\"col_start\":6,\"words\":\"1个循环\"},{\"col_end\":8,\"row_end\":4,\"cell_location\":[{\"x\":350,\"y\":77},{\"x\":400,\"y\":77},{\"x\":400,\"y\":177},{\"x\":350,\"y\":177}],\"row_start\":3,\"col_start\":7,\"words\":\"0个循环\"},{\"col_end\":9,\"row_end\":4,\"cell_location\":[{\"x\":400,\"y\":77},{\"x\":450,\"y\":77},{\"x\":450,\"y\":177},{\"x\":400,\"y\":177}],\"row_start\":3,\"col_start\":8,\"words\":\"2个循环\"},{\"col_end\":10,\"row_end\":4,\"cell_location\":[{\"x\":450,\"y\":77},{\"x\":500,\"y\":77},{\"x\":500,\"y\":177},{\"x\":450,\"y\":177}],\"row_start\":3,\"col_start\":9,\"words\":\"0个循环\"},{\"col_end\":11,\"row_end\":4,\"cell_location\":[{\"x\":500,\"y\":77},{\"x\":550,\"y\":77},{\"x\":550,\"y\":177},{\"x\":500,\"y\":177}],\"row_start\":3,\"col_start\":10,\"words\":\"0个循环\"},{\"col_end\":12,\"row_end\":4,\"cell_location\":[{\"x\":550,\"y\":77},{\"x\":601,\"y\":77},{\"x\":601,\"y\":177},{\"x\":550,\"y\":177}],\"row_start\":3,\"col_start\":11,\"words\":\"1个循环\"},{\"col_end\":13,\"row_end\":5,\"cell_location\":[{\"x\":601,\"y\":77},{\"x\":737,\"y\":77},{\"x\":737,\"y\":293},{\"x\":601,\"y\":292}],\"row_start\":3,\"col_start\":12,\"words\":\"1、3306工作面使用变化\\n情形二（末采）\\n2、副斜井上段使用变化\\n情形四（迎头软岩、顶板\\n硬岩)\\n3、3305运输顺槽变化情\\n形三（过本煤层空巷期\\n间)\"},{\"col_end\":1,\"row_end\":5,\"cell_location\":[{\"x\":0,\"y\":177},{\"x\":47,\"y\":177},{\"x\":47,\"y\":293},{\"x\":0,\"y\":292}],\"row_start\":4,\"col_start\":0,\"words\":\"正常\"},{\"col_end\":2,\"row_end\":5,\"cell_location\":[{\"x\":47,\"y\":177},{\"x\":98,\"y\":177},{\"x\":98,\"y\":293},{\"x\":47,\"y\":293}],\"row_start\":4,\"col_start\":1,\"words\":\"检修设\\n备、标\\n准化治\\n理、探\\n水\"},{\"col_end\":3,\"row_end\":5,\"cell_location\":[{\"x\":98,\"y\":177},{\"x\":147,\"y\":177},{\"x\":147,\"y\":293},{\"x\":98,\"y\":293}],\"row_start\":4,\"col_start\":2,\"words\":\"标准化\\n治理\"},{\"col_end\":4,\"row_end\":5,\"cell_location\":[{\"x\":147,\"y\":177},{\"x\":199,\"y\":177},{\"x\":199,\"y\":293},{\"x\":147,\"y\":293}],\"row_start\":4,\"col_start\":3,\"words\":\"标准化\\n治理\"},{\"col_end\":5,\"row_end\":5,\"cell_location\":[{\"x\":199,\"y\":177},{\"x\":249,\"y\":177},{\"x\":249,\"y\":293},{\"x\":199,\"y\":293}],\"row_start\":4,\"col_start\":4,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":6,\"row_end\":5,\"cell_location\":[{\"x\":249,\"y\":177},{\"x\":298,\"y\":177},{\"x\":298,\"y\":293},{\"x\":249,\"y\":293}],\"row_start\":4,\"col_start\":5,\"words\":\"正常\"},{\"col_end\":7,\"row_end\":5,\"cell_location\":[{\"x\":298,\"y\":177},{\"x\":350,\"y\":177},{\"x\":350,\"y\":293},{\"x\":298,\"y\":293}],\"row_start\":4,\"col_start\":6,\"words\":\"标准化\\n治理\"},{\"col_end\":8,\"row_end\":5,\"cell_location\":[{\"x\":350,\"y\":177},{\"x\":400,\"y\":177},{\"x\":400,\"y\":293},{\"x\":350,\"y\":293}],\"row_start\":4,\"col_start\":7,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":9,\"row_end\":5,\"cell_location\":[{\"x\":400,\"y\":177},{\"x\":450,\"y\":177},{\"x\":450,\"y\":293},{\"x\":400,\"y\":293}],\"row_start\":4,\"col_start\":8,\"words\":\"正常\"},{\"col_end\":10,\"row_end\":5,\"cell_location\":[{\"x\":450,\"y\":177},{\"x\":500,\"y\":177},{\"x\":500,\"y\":293},{\"x\":450,\"y\":293}],\"row_start\":4,\"col_start\":9,\"words\":\"标准化\\n治理\"},{\"col_end\":11,\"row_end\":5,\"cell_location\":[{\"x\":500,\"y\":177},{\"x\":550,\"y\":177},{\"x\":550,\"y\":293},{\"x\":500,\"y\":293}],\"row_start\":4,\"col_start\":10,\"words\":\"检修设\\n备、标\\n准化治\\n理\"},{\"col_end\":12,\"row_end\":5,\"cell_location\":[{\"x\":550,\"y\":177},{\"x\":601,\"y\":177},{\"x\":601,\"y\":293},{\"x\":550,\"y\":293}],\"row_start\":4,\"col_start\":11,\"words\":\"正常\"}],\"table_location\":[{\"x\":0,\"y\":0},{\"x\":737,\"y\":0},{\"x\":737,\"y\":293},{\"x\":0,\"y\":293}],\"footer\":[]}],\"table_num\":1,\"log_id\":1910572136862638890}";
        JSONObject jsonObject = JSONObject.parseObject(text);
        String body = jsonObject.getString("body");
        System.out.println(body);
    }
}
